<link rel="stylesheet" href="/luci-static/resources/datepicker.css">
    <script src="/luci-static/resources/datepicker.js"></script>
<script>
    Calendar.create({
        classN: 'cbi-input-calendar',
        callBack: function(bindElem, dateObj) {
			if (dateObj.month < 10){
				if (dateObj.date < 10){
					bindElem.value = '0' + dateObj.month + '-' + '0' + dateObj.date;
				}
				else{
					bindElem.value = '0' + dateObj.month + '-' + dateObj.date;
				}
			}
			else{
				bindElem.value = dateObj.month + '-' + dateObj.date;
			}
        }
    })
    TimePicker.create({
        classN: 'cbi-input-time',
        callBack: function(bindElem, timeObj) {
          if (timeObj.hour < 10 ){
				if (timeObj.minute < 10){
					bindElem.value = '0' + timeObj.hour + ':' + '0' + timeObj.minute;
				}
				else{
					bindElem.value = '0' + timeObj.hour + ':' + timeObj.minute;
				}
				}
			else{
           if (timeObj.minute < 10){
					bindElem.value = timeObj.hour + ':' + '0' + timeObj.minute;
				}
				else{
					bindElem.value = timeObj.hour + ':' + timeObj.minute;
				}
				}
        }
    })
</script>
